#pragma once
#include "MonitorMessage.h"
// CGroupTreeCtrl

class CGroupTreeCtrl : public CTreeCtrl, public CMonitorMessageReceiver
{
	DECLARE_DYNAMIC(CGroupTreeCtrl)

public:
	CGroupTreeCtrl();
	virtual ~CGroupTreeCtrl();

	void InitGroupTree();
	BOOL FindItem(IBaseClass* pobj, HTREEITEM hStart, HTREEITEM &hReturn);
	void SetEmapPage(){m_bEmapPage = TRUE;}
	void SetEnableDrag(BOOL bEnable){m_bEnableDrag = bEnable;}

protected:
	void InitDeviceGroupTree();
	void InitChannelGroupTree();
	virtual void OnGeneralMesage(CGeneralMessage* pMessage);
	virtual void OnPlatformMessage(CPlatformMessage* pMessage);
	BOOL m_bEmapPage;
	BOOL m_bEnableDrag;
	CTreeDataMap m_treeDataMap;

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnTvnBegindrag(NMHDR *pNMHDR, LRESULT *pResult);
};


